#include <iostream>
#include <algorithm>
#include <string.h>
using namespace std;
int main() {
  int uninitArr[10];
  cout << "sizeof int[10]: " << sizeof(uninitArr) << endl;
  for (auto& x: uninitArr) cout << x << ' ';
  cout << endl;
  int initZeroArr[10] = {};
  for (auto& x: initZeroArr) cout << x << ' ';
  cout << endl;
  int initPartArr[10] = {1, 2, 3};
  for (auto& x: initPartArr) cout << x << ' ';
  cout << endl;
  int noLengthArr[] = {1, 2, 3};
  for (auto& x: noLengthArr) cout << x << ' ';
  cout << endl;
  int arr[10];
  fill(arr, arr + 10, 1);
  cout << "fill(1): ";
  for (auto& x: arr) cout << x << ' ';
  cout << endl;
  cout << "fill(2): ";
  fill(arr + 3, arr + 8, 2);
  for (auto& x: arr) cout << x << ' ';
  cout << endl;
  cout << "memset(0): ";
  memset(arr, 0, sizeof(arr));
  for (auto& x: arr) cout << x << ' ';
  cout << endl;
  cout << "memset(-1): ";
  memset(arr + 3, -1, sizeof(int) * 5);
  for (auto& x: arr) cout << x << ' ';
  cout << endl;
  cout << "memset(1): ";
  memset(arr, 1, sizeof(arr));
  for (auto& x: arr) cout << x << ' ';
  cout << endl;


  int matrix[10][10];
  int index = 0;
  for (int i = 0; i < 10; i ++) {
    for (int j = 0; j < 10; j ++) {
      matrix[i][j] = index++;
    }
  }
  for (auto& line: matrix) {
    for (auto& x: line) {
      cout.width(3);
      cout << x;
    }
    cout << endl;
  }
}